import http from '../common/http.js'

export default {
	userOpenid: (data) => {
		return http.post({
			url: 'user/openid',
			data,
		})
	},
	wechatLogin: (data) => {
		return http.post({
			url: 'user/wechatLogin1',
			data,
		})
	},
	getWechatMobile: (data) => {
		return http.post({
			url: 'phone/getPhoneNumber',
			data,
		})
	},
	getUserInfo: (data) => {
		return http.post({
			url: 'user/getUserInfo',
			data,
		})
	},
	getConfig: (data) => {
		return http.get({
			url: 'index/config',
			data,
		})
	},
	getBanner: (data) => {
		return http.get({
			url: 'index/banner',
			data,
		})
	},
	ticketsLists: (data) => {
		return http.get({
			url: 'tickets/lists',
			data,
		})
	},
	ticketsYingdi: (data) => {
		return http.get({
			url: 'tickets/yingdi',
			data,
		})
	},
	ticketsWuyou: (data) => {
		return http.get({
			url: 'tickets/wuyou',
			data,
		})
	},
	ticketsDetail: (data) => {
		return http.get({
			url: 'tickets/detail',
			data,
		})
	},
	ticketsDetail1: (data) => {
		return http.get({
			url: 'tickets/detail1',
			data,
		})
	},
	certAddCert: (data) => {
		return http.post({
			url: 'cert/addCert',
			data,
			noLoading:true
		})
	},
	certLists: (data) => {
		return http.get({
			url: 'cert/lists',
			data,
			noLoading:true
		})
	},
	delCert: (data) => {
		return http.post({
			url: 'cert/delCert',
			data,
		})
	},
	clearCert: (data) => {
		return http.post({
			url: 'cert/clearCert',
			data,
		})
	},
	createOrder: (data) => {
		return http.post({
			url: 'order/createOrder',
			data,
			contentType:'application/x-www-form-urlencoded'
		})
	},
	orderLists: (data) => {
		return http.get({
			url: 'order/lists',
			data,
		})
	},
	payment: (data) => {
		return http.post({
			url: 'order/payment',
			data,
		})
	},
	applyRefund: (data) => {
		return http.post({
			url: 'order/applyRefund',
			data,
		})
	},
	orderDetail: (data) => {
		return http.get({
			url: 'order/detail',
			data,
		})
	},
	orderCancel: (data) => {
		return http.post({
			url: 'order/cancel',
			data,
		})
	},
	hexiao: (data) => {
		return http.post({
			url: 'order/hexiao',
			data,
		})
	},
}